package org.yelongframework.zip.file;

import java.io.Closeable;
import java.io.IOException;

import org.yelongframework.lang.Nullable;

/**
 * 读的压缩文件
 * 
 * @since 1.0.0
 */
public class ReadZipFile extends ZipFile implements Closeable {

	/** 流关闭处理 */
	@Nullable
	private final Closeable closeable;

	// ==================================================构造器==================================================

	/**
	 * @param closeable 流关闭处理
	 */
	public ReadZipFile(@Nullable Closeable closeable) {
		super();
		this.closeable = closeable;
	}

	// ==================================================关闭==================================================

	@Override
	public void close() throws IOException {
		if (null != closeable) {
			closeable.close();
		}
	}

}
